<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../../../css/app.css">
    <link rel="stylesheet" type="text/css" href="../../../css/tabBar.css">
    <link rel="stylesheet" type="text/css" href="../comm/buy_comm.css"/>
    <link rel="stylesheet" type="text/css" href="../comm/xy-pop.css">
    <link rel="stylesheet" type="text/css" href="./css/my_coupon.css">
    <title>我的优惠券</title>
</head>

<body>
	<div class="header navigationBar">
      	<div class="wrapper">
          	<span id="btn-back" class="header-btn left-btn backtrack"></span>
          	<span class="title">我的优惠券</span>
          	<span class="right-btn" id="myCouponEdit">编辑</span>
      	</div>
  	</div>
  	<div class="container top-container" v-cloak>
  		<div class="my-coupon-null" style="display: none;" ref="myCouponNull">
  			<img src="../../../image/shop/buy/buy-77.png"/>
  			<h2 v-html="nullTxt" style="padding: 20px 0 0;"></h2>
  			<p>要是宝贝到手了，那就赶紧享用吧</p>
  		</div>
  		<div class="my-coupon-tab">
  			<a href="javascript:void(0);" @click="myCouponTab" v-for="(item,index) in tabTxt" :class="activeIndex == index ? 'active' : ''" :data-index="index" v-html="item"></a>
  		</div>
  		<ul :class="is_Show ? 'input-active my-coupon-list' : 'my-coupon-list'" id="myCouponList" ref="myCouponList">
  			<li :class="state == 1 ? 'coupon-yes' : state == 2 ? 'coupon-due' : ''" v-for="(item,index) in list">
  				<input type="checkbox" :data-index="index" name="" class="aui-radio" value="" @click="listInputCheck" :data-state="item.state" :data-cdid="item.coupon_discount_id" :data-cid="item.coupon_id"/>
  				<div class="coupon-info">
	  				<img :src="item.shop_logo+'?x-oss-process=image/resize,m_lfit,w_960'"/>
  					<h2 v-html="item.active_name"></h2>
  					<p v-html="item.use_start_date +'至'+ item.use_end_date"></p>
  				</div>
  				<div class="coupon-status" v-if="state == 1">
  					<span>已使用</span>
  				</div>
  				<div class="coupon-status" v-if="state == 2">
  					<span>已过期</span>
  				</div>
  				<div class="coupon-face" @click="goShopMain" :data-state="item.state" :data-userid="item.shop_user_id" :data-cdid="item.coupon_discount_id" :data-cid="item.coupon_id">
  					<div>¥<span v-html="(Math.ceil(item.amount) > 1 ? Math.ceil(item.amount) : item.amount) || 0"></span></div>
  					<p v-html="'满'+(Math.ceil(item.min_goods_amount) > 1 ? Math.ceil(item.min_goods_amount) : item.min_goods_amount)+'使用'"></p>
  					<a href="javascript:void(0);" v-show="state == 0">去使用</a>
  				</div>
  				<div class="coupon-bg"></div>
  			</li>
  		</ul>
  		<div :class="is_Show ? 'active my-coupon-btn' : 'my-coupon-btn'" id="myCouponBtn">
  			<input type="checkbox" name="" class="aui-radio" value="" ref="myCouponCheckAll" id="myCouponCheckAll" @click="myCouponCheckAll"/>全选
  			<div>
  				<a href="javascript:void(0);" @click="cancelEdit">取消</a>
  				<a href="javascript:void(0);" @click="couponDel">删除</a>
  			</div>
  		</div>
  	</div>
</body>
<script src="../../sea.js" data-main="../../main"></script>
<script type="text/javascript" src="../../vue.js"></script>
<script type="text/javascript" src="./js/myCoupon.js"></script>
</html>
